<html>
 <head>
  <meta charset="utf-8"/>
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  <title>
   Kafka+Spark Streaming+Redis实时计算整合实践  | 数螺 | NAUT IDEA
  </title>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap-theme.min.css" rel="stylesheet"/>
  <link href="http://cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/>
  <style type="text/css">
   #xmain img {
                  max-width: 100%;
                  display: block;
                  margin-top: 10px;
                  margin-bottom: 10px;
                }

                #xmain p {
                    line-height:150%;
                    font-size: 16px;
                    margin-top: 20px;
                }

                #xmain h2 {
                    font-size: 24px;
                }

                #xmain h3 {
                    font-size: 20px;
                }

                #xmain h4 {
                    font-size: 18px;
                }


                .header {
	           background-color: #0099ff;
	           color: #ffffff;
	           margin-bottom: 20px;
	        }

	        .header p {
                  margin: 0px;
                  padding: 10px 0;
                  display: inline-block;  
                  vertical-align: middle;
                  font-size: 16px;
               }

               .header a {
                 color: white;
               }

              .header img {
                 height: 25px;
              }
  </style>
  <script src="http://cdn.bootcss.com/jquery/3.0.0/jquery.min.js">
  </script>
  <script src="http://nautstatic-10007657.file.myqcloud.com/static/css/readability.min.js" type="text/javascript">
  </script>
  <script type="text/javascript">
   $(document).ready(function() {
                 var loc = document.location;
                 var uri = {
                  spec: "http://dataunion.org/17837.html",
                  host: "http://dataunion.org",
                  prePath: "http://dataunion.org",
                  scheme: "http",
                  pathBase: "http://dataunion.org/"
                 };
    
                 var documentClone = document.cloneNode(true);
                 var article = new Readability(uri, documentClone).parse();
     
                 document.getElementById("xmain").innerHTML = article.content;
                });
  </script>
  <!-- 1466459664: Accept with keywords: (title(0.5):Spark,数盟,计算,社区, topn(0.433333333333):社区,数盟,行业资讯,时间,事件,数据挖掘,官网,hadoop,模式,文档,计算结果,计算,文章,组件,基础架构,Spark,数据,节点,对象,间隔,用户,spark,编程语言,代码,平台,程序,集群,数据流,时候,序列化).-->
 </head>
 <body onload="">
  <div class="header">
   <div class="container">
    <div class="row">
     <div class="col-xs-6 col-sm-6 text-left">
      <a href="/databee">
       <img src="http://nautidea-10007657.cos.myqcloud.com/logo_white.png"/>
      </a>
      <a href="/databee">
       <p>
        数螺
       </p>
      </a>
     </div>
     <div class="hidden-xs col-sm-6 text-right">
      <p>
       致力于数据科学的推广和知识传播
      </p>
     </div>
    </div>
   </div>
  </div>
  <div class="container text-center">
   <h1>
    Kafka+Spark Streaming+Redis实时计算整合实践
   </h1>
  </div>
  <div class="container" id="xmain">
   ﻿﻿
   <title>
    Kafka+Spark Streaming+Redis实时计算整合实践 | 数盟社区
   </title>
   <!-- All in One SEO Pack 2.2.7.6.2 by Michael Torbert of Semper Fi Web Design[32,82] -->
   <!-- /all in one seo pack -->
   <!--
<div align="center">
<a href="http://strata.oreilly.com.cn/hadoop-big-data-cn?cmp=mp-data-confreg-home-stcn16_dataunion_pc" target="_blank"><img src="http://dataunion.org/wp-content/uploads/2016/05/stratabj.jpg"/ ></a>
</div>
-->
   <header id="header-web">
    <div class="header-main">
     <hgroup class="logo">
      <h1>
       <a href="http://dataunion.org/" rel="home" title="数盟社区">
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/logo.png"/>
       </a>
      </h1>
     </hgroup>
     <!--logo-->
     <nav class="header-nav">
      <ul class="menu" id="menu-%e4%b8%bb%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-71" id="menu-item-71">
        <a href="http://dataunion.org/category/events" title="events">
         活动
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22457" id="menu-item-22457">
          <a href="http://dataunion.org/2016timeline">
           2016档期
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22459" id="menu-item-22459">
          <a href="http://dataunion.org/category/parterc">
           合作会议
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category current-post-ancestor current-menu-parent current-post-parent menu-item-has-children menu-item-20869" id="menu-item-20869">
        <a href="http://dataunion.org/category/tech" title="articles">
         文章
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20867" id="menu-item-20867">
          <a href="http://dataunion.org/category/tech/base" title="base">
           基础架构
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3302" id="menu-item-3302">
          <a href="http://dataunion.org/category/tech/ai" title="ai">
           人工智能
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3303" id="menu-item-3303">
          <a href="http://dataunion.org/category/tech/analysis" title="analysis">
           数据分析
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21920" id="menu-item-21920">
          <a href="http://dataunion.org/category/tech/dm">
           数据挖掘
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3314" id="menu-item-3314">
          <a href="http://dataunion.org/category/tech/viz" title="viz">
           可视化
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-3305" id="menu-item-3305">
          <a href="http://dataunion.org/category/tech/devl" title="devl">
           编程语言
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-20876" id="menu-item-20876">
        <a href="http://dataunion.org/category/industry">
         行业
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-16328" id="menu-item-16328">
          <a href="http://dataunion.org/category/industry/case" title="case">
           行业应用
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-2112" id="menu-item-2112">
          <a href="http://dataunion.org/category/industry/demo" title="demo">
           Demo展示
          </a>
         </li>
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21562" id="menu-item-21562">
          <a href="http://dataunion.org/category/industry/news">
           行业资讯
          </a>
         </li>
        </ul>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-311" id="menu-item-311">
        <a href="http://dataunion.org/category/sources" title="sources">
         资源
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20870" id="menu-item-20870">
        <a href="http://dataunion.org/category/books" title="book">
         图书
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-21363" id="menu-item-21363">
        <a href="http://dataunion.org/category/training">
         课程
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-has-children menu-item-21853" id="menu-item-21853">
        <a href="http://dataunion.org/category/jobs">
         职位
        </a>
        <ul class="sub-menu">
         <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-22050" id="menu-item-22050">
          <a href="http://dataunion.org/category/career">
           职业规划
          </a>
         </li>
        </ul>
       </li>
      </ul>
     </nav>
     <!--header-nav-->
    </div>
   </header>
   <!--header-web-->
   <div id="main">
    <div id="soutab">
     <form action="http://dataunion.org/" class="search" method="get">
     </form>
    </div>
    <div id="container">
     <nav id="mbx">
      当前位置：
      <a href="http://dataunion.org">
       首页
      </a>
      &gt;
      <a href="http://dataunion.org/category/tech">
       文章
      </a>
      &gt;  正文
     </nav>
     <!--mbx-->
     <article class="content">
      <header align="centre" class="contenttitle">
       <div class="mscc">
        <h1 class="mscctitle">
         <a href="http://dataunion.org/17837.html">
          Kafka+Spark Streaming+Redis实时计算整合实践
         </a>
        </h1>
        <address class="msccaddress ">
         <em>
          5,505 次阅读 -
         </em>
         <a href="http://dataunion.org/category/tech" rel="category tag">
          文章
         </a>
        </address>
       </div>
      </header>
      <div class="content-text">
       <blockquote>
        <p>
         作者：
         <a class="url fn n" href="http://shiyanjun.cn/archives/author/yanjun" rel="author" title="查看作者 Yanjun 的全部文章">
          Yanjun
         </a>
         出处：
         <a href="http://shiyanjun.cn/" rel="home" title="简单之美">
          简单之美
         </a>
        </p>
       </blockquote>
       <p>
        基于Spark通用计算平台，可以很好地扩展各种计算类型的应用，尤其是Spark提供了内建的计算库支持，像Spark Streaming、Spark SQL、MLlib、GraphX，这些内建库都提供了高级抽象，可以用非常简洁的代码实现复杂的计算逻辑、这也得益于Scala编程语言的简洁性。这里，我们基于1.3.0版本的Spark搭建了计算平台，实现基于Spark Streaming的实时计算。
       </p>
       <p>
        我们的应用场景是分析用户使用手机App的行为，描述如下所示：
       </p>
       <ul>
        <li>
         手机客户端会收集用户的行为事件（我们以点击事件为例），将数据发送到数据服务器，我们假设这里直接进入到Kafka消息队列
        </li>
        <li>
         后端的实时服务会从Kafka消费数据，将数据读出来并进行实时分析，这里选择Spark Streaming，因为Spark Streaming提供了与Kafka整合的内置支持
        </li>
        <li>
         经过Spark Streaming实时计算程序分析，将结果写入Redis，可以实时获取用户的行为数据，并可以导出进行离线综合统计分析
        </li>
       </ul>
       <p>
        <strong>
         Spark Streaming介绍
        </strong>
       </p>
       <p>
        Spark Streaming提供了一个叫做DStream（Discretized Stream）的高级抽象，DStream表示一个持续不断输入的数据流，可以基于Kafka、TCP Socket、Flume等输入数据流创建。在内部，一个DStream实际上是由一个RDD序列组成的。Sparking Streaming是基于Spark平台的，也就继承了Spark平台的各种特性，如容错（Fault-tolerant）、可扩展（Scalable）、高吞吐（High-throughput）等。
        <br/>
        在Spark Streaming中，每个DStream包含了一个时间间隔之内的数据项的集合，我们可以理解为指定时间间隔之内的一个batch，每一个batch就构成一个RDD数据集，所以DStream就是一个个batch的有序序列，时间是连续的，按照时间间隔将数据流分割成一个个离散的RDD数据集，如图所示（来自官网）：
        <br/>
        <img src="http://dataunion.org/wp-content/uploads/2015/05/streaming-dstream.png"/>
        <br/>
        我们都知道，Spark支持两种类型操作：Transformations和Actions。Transformation从一个已知的RDD数据集经过转换得到一个新的RDD数据集，这些Transformation操作包括map、filter、flatMap、union、join等，而且Transformation具有lazy的特性，调用这些操作并没有立刻执行对已知RDD数据集的计算操作，而是在调用了另一类型的Action操作才会真正地执行。Action执行，会真正地对RDD数据集进行操作，返回一个计算结果给Driver程序，或者没有返回结果，如将计算结果数据进行持久化，Action操作包括reduceByKey、count、foreach、collect等。关于Transformations和Actions更详细内容，可以查看官网文档。
       </p>
       <p>
        同样、Spark Streaming提供了类似Spark的两种操作类型，分别为Transformations和Output操作，它们的操作对象是DStream，作用也和Spark类似：Transformation从一个已知的DStream经过转换得到一个新的DStream，而且Spark Streaming还额外增加了一类针对Window的操作，当然它也是Transformation，但是可以更灵活地控制DStream的大小（时间间隔大小、数据元素个数），例如window(windowLength, slideInterval)、countByWindow(windowLength, slideInterval)、reduceByWindow(func, windowLength, slideInterval)等。Spark Streaming的Output操作允许我们将DStream数据输出到一个外部的存储系统，如数据库或文件系统等，执行Output操作类似执行Spark的Action操作，使得该操作之前lazy的Transformation操作序列真正地执行。
       </p>
       <p>
        <strong>
         Kafka+Spark Streaming+Redis编程实践
        </strong>
       </p>
       <p>
        下面，我们根据上面提到的应用场景，来编程实现这个实时计算应用。首先，写了一个Kafka Producer模拟程序，用来模拟向Kafka实时写入用户行为的事件数据，数据是JSON格式，示例如下：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce5593907370516" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          {"uid":"068b746ed4620d25e26055a9f804385f","event_time":"1430204612405","os_type":"Android","click_count":6}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce5593907370516-1">
               1
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce5593907370516-1">
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-s">
                "uid"
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                "068b746ed4620d25e26055a9f804385f"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                "event_time"
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                "1430204612405"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                "os_type"
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-s">
                "Android"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-s">
                "click_count"
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0010 seconds] -->
       <p>
        一个事件包含4个字段：
       </p>
       <ul>
        <li>
         uid：用户编号
        </li>
        <li>
         event_time：事件发生时间戳
        </li>
        <li>
         os_type：手机App操作系统类型
        </li>
        <li>
         click_count：点击次数
        </li>
       </ul>
       <p>
        下面是我们实现的代码，如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55a3557599087" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          package org.shirdrn.spark.streaming.utils

import java.util.Properties
import scala.util.Properties
import org.codehaus.jettison.json.JSONObject
import kafka.javaapi.producer.Producer
import kafka.producer.KeyedMessage
import kafka.producer.KeyedMessage
import kafka.producer.ProducerConfig
import scala.util.Random

object KafkaEventProducer {
 
  private val users = Array(
      "4A4D769EB9679C054DE81B973ED5D768", "8dfeb5aaafc027d89349ac9a20b3930f",
      "011BBF43B89BFBF266C865DF0397AA71", "f2a8474bf7bd94f0aabbd4cdd2c06dcf",
      "068b746ed4620d25e26055a9f804385f", "97edfc08311c70143401745a03a50706",
      "d7f141563005d1b5d0d3dd30138f3f62", "c8ee90aade1671a21336c721512b817a",
      "6b67c8c700427dee7552f81f3228c927", "a95f22eabc4fd4b580c011a3161a9d9d")
     
  private val random = new Random()
     
  private var pointer = -1
 
  def getUserID() : String = {
       pointer = pointer + 1
    if(pointer &amp;gt;= users.length) {
      pointer = 0
      users(pointer)
    } else {
      users(pointer)
    }
  }
 
  def click() : Double = {
    random.nextInt(10)
  }
 
  // bin/kafka-topics.sh --zookeeper zk1:2181,zk2:2181,zk3:2181/kafka --create --topic user_events --replication-factor 2 --partitions 2
  // bin/kafka-topics.sh --zookeeper zk1:2181,zk2:2181,zk3:2181/kafka --list
  // bin/kafka-topics.sh --zookeeper zk1:2181,zk2:2181,zk3:2181/kafka --describe user_events
  // bin/kafka-console-consumer.sh --zookeeper zk1:2181,zk2:2181,zk3:22181/kafka --topic test_json_basis_event --from-beginning
  def main(args: Array[String]): Unit = {
    val topic = "user_events"
    val brokers = "10.10.4.126:9092,10.10.4.127:9092"
    val props = new Properties()
    props.put("metadata.broker.list", brokers)
    props.put("serializer.class", "kafka.serializer.StringEncoder")
   
    val kafkaConfig = new ProducerConfig(props)
    val producer = new Producer[String, String](kafkaConfig)
   
    while(true) {
      // prepare event data
      val event = new JSONObject()
      event
        .put("uid", getUserID)
        .put("event_time", System.currentTimeMillis.toString)
        .put("os_type", "Android")
        .put("click_count", click)
     
      // produce event message
      producer.send(new KeyedMessage[String, String](topic, event.toString))
      println("Message sent: " + event)
     
      Thread.sleep(200)
    }
  }  
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-49">
               49
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-50">
               50
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-51">
               51
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-52">
               52
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-53">
               53
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-54">
               54
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-55">
               55
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-56">
               56
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-57">
               57
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-58">
               58
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-59">
               59
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-60">
               60
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-61">
               61
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-62">
               62
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-63">
               63
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-64">
               64
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-65">
               65
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-66">
               66
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-67">
               67
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55a3557599087-68">
               68
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55a3557599087-69">
               69
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-1">
               <span class="crayon-t">
                package
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                shirdrn
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                utils
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-2">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-3">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                java
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Properties
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-4">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Properties
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-5">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                codehaus
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                jettison
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                json
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                JSONObject
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-6">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                javaapi
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                producer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Producer
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-7">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                producer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                KeyedMessage
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-8">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                producer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                KeyedMessage
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-9">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                producer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                ProducerConfig
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-10">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                util
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Random
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-11">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-12">
               <span class="crayon-t">
                object
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                KafkaEventProducer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-13">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                users
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Array
               </span>
               <span class="crayon-sy">
                (
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "4A4D769EB9679C054DE81B973ED5D768"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "8dfeb5aaafc027d89349ac9a20b3930f"
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "011BBF43B89BFBF266C865DF0397AA71"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "f2a8474bf7bd94f0aabbd4cdd2c06dcf"
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "068b746ed4620d25e26055a9f804385f"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "97edfc08311c70143401745a03a50706"
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "d7f141563005d1b5d0d3dd30138f3f62"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "c8ee90aade1671a21336c721512b817a"
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "6b67c8c700427dee7552f81f3228c927"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "a95f22eabc4fd4b580c011a3161a9d9d"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-20">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                random
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Random
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-22">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                var
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-24">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                getUserID
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                users
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                length
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                users
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                else
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                users
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pointer
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-34">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                click
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Double
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-36">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                random
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                nextInt
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-37">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-38">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // bin/kafka-topics.sh --zookeeper zk1:2181,zk2:2181,zk3:2181/kafka --create --topic user_events --replication-factor 2 --partitions 2
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-40">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // bin/kafka-topics.sh --zookeeper zk1:2181,zk2:2181,zk3:2181/kafka --list
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // bin/kafka-topics.sh --zookeeper zk1:2181,zk2:2181,zk3:2181/kafka --describe user_events
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-42">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // bin/kafka-console-consumer.sh --zookeeper zk1:2181,zk2:2181,zk3:22181/kafka --topic test_json_basis_event --from-beginning
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Array
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Unit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-44">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                topic
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "user_events"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                brokers
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "10.10.4.126:9092,10.10.4.127:9092"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                props
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Properties
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-47">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                props
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "metadata.broker.list"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                brokers
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-48">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                props
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "serializer.class"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "kafka.serializer.StringEncoder"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-49">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-50">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                kafkaConfig
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                ProducerConfig
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                props
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-51">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                producer
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Producer
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                kafkaConfig
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-52">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-53">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                while
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-t">
                true
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-54">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // prepare event data
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-55">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                event
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                JSONObject
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-56">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                event
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-57">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "uid"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                getUserID
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-58">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "event_time"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                System
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                currentTimeMillis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                toString
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-59">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "os_type"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "Android"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-60">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                put
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "click_count"
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                click
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-61">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-62">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // produce event message
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-63">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                producer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                send
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                KeyedMessage
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                topic
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                event
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                toString
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-64">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Message sent: "
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                event
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-65">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-66">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Thread
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                sleep
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                200
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-67">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55a3557599087-68">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55a3557599087-69">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0518 seconds] -->
       <p>
        通过控制上面程序最后一行的时间间隔来控制模拟写入速度。下面我们来讨论实现实时统计每个用户的点击次数，它是按照用户分组进行累加次数，逻辑比较简单，关键是在实现过程中要注意一些问题，如对象序列化等。先看实现代码，稍后我们再详细讨论，代码实现如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55ac911501886" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          object UserClickCountAnalytics {

  def main(args: Array[String]): Unit = {
    var masterUrl = "local[1]"
    if (args.length &amp;gt; 0) {
      masterUrl = args(0)
    }

    // Create a StreamingContext with the given master URL
    val conf = new SparkConf().setMaster(masterUrl).setAppName("UserClickCountStat")
    val ssc = new StreamingContext(conf, Seconds(5))

    // Kafka configurations
    val topics = Set("user_events")
    val brokers = "10.10.4.126:9092,10.10.4.127:9092"
    val kafkaParams = Map[String, String](
      "metadata.broker.list" -&amp;gt; brokers, "serializer.class" -&amp;gt; "kafka.serializer.StringEncoder")

    val dbIndex = 1
    val clickHashKey = "app::users::click"

    // Create a direct stream
    val kafkaStream = KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](ssc, kafkaParams, topics)

    val events = kafkaStream.flatMap(line =&amp;gt; {
      val data = JSONObject.fromObject(line._2)
      Some(data)
    })

    // Compute user click times
    val userClicks = events.map(x =&amp;gt; (x.getString("uid"), x.getInt("click_count"))).reduceByKey(_ + _)
    userClicks.foreachRDD(rdd =&amp;gt; {
      rdd.foreachPartition(partitionOfRecords =&amp;gt; {
        partitionOfRecords.foreach(pair =&amp;gt; {
          val uid = pair._1
          val clickCount = pair._2
          val jedis = RedisClient.pool.getResource
          jedis.select(dbIndex)
          jedis.hincrBy(clickHashKey, uid, clickCount)
          RedisClient.pool.returnResource(jedis)
        })
      })
    })

    ssc.start()
    ssc.awaitTermination()

  }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ac911501886-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55ac911501886-49">
               49
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-1">
               <span class="crayon-t">
                object
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                UserClickCountAnalytics
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-2">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Array
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Unit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                var
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                masterUrl
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "local[1]"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                length
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                masterUrl
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                args
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-8">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Create a StreamingContext with the given master URL
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                SparkConf
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setMaster
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                masterUrl
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setAppName
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "UserClickCountStat"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                StreamingContext
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Seconds
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-12">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Kafka configurations
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                topics
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Set
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "user_events"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                brokers
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "10.10.4.126:9092,10.10.4.127:9092"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                kafkaParams
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Map
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                (
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "metadata.broker.list"
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                brokers
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "serializer.class"
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "kafka.serializer.StringEncoder"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-18">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                dbIndex
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                clickHashKey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "app::users::click"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-21">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Create a direct stream
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                kafkaStream
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                KafkaUtils
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                createDirectStream
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                StringDecoder
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                StringDecoder
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                kafkaParams
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                topics
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-24">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                events
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                kafkaStream
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                flatMap
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                data
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                JSONObject
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                fromObject
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                _2
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Some
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                data
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-29">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Compute user click times
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                userClicks
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                events
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                map
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getString
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "uid"
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getInt
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "click_count"
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                reduceByKey
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                userClicks
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                foreachRDD
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                rdd
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                rdd
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                foreachPartition
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                partitionOfRecords
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-34">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                partitionOfRecords
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-st">
                foreach
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                uid
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                _1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-36">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                clickCount
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                _2
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-37">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                RedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getResource
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-38">
               <span class="crayon-e">
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                select
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                dbIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                hincrBy
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                clickHashKey
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                uid
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                clickCount
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-40">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                RedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                returnResource
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-42">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-44">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                awaitTermination
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-47">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ac911501886-48">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55ac911501886-49">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0470 seconds] -->
       <p>
        上面代码使用了Jedis客户端来操作Redis，将分组计数结果数据累加写入Redis存储，如果其他系统需要实时获取该数据，直接从Redis实时读取即可。RedisClient实现代码如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55b5834129925" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          object RedisClient extends Serializable {
  val redisHost = "10.10.4.130"
  val redisPort = 6379
  val redisTimeout = 30000
  lazy val pool = new JedisPool(new GenericObjectPoolConfig(), redisHost, redisPort, redisTimeout)

  lazy val hook = new Thread {
    override def run = {
      println("Execute hook thread: " + this)
      pool.destroy()
    }
  }
  sys.addShutdownHook(hook.run)
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55b5834129925-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55b5834129925-14">
               14
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-1">
               <span class="crayon-t">
                object
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                RedisClient
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                extends
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Serializable
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "10.10.4.130"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                6379
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                30000
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                lazy
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                JedisPool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                GenericObjectPoolConfig
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-6">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-7">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                lazy
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                hook
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Thread
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                override
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-v">
                run
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                println
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "Execute hook thread: "
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                this
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                destroy
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55b5834129925-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sys
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                addShutdownHook
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                hook
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                run
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55b5834129925-14">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0142 seconds] -->
       <p>
        上面代码我们分别在local[K]和Spark Standalone集群模式下运行通过。
       </p>
       <p>
        如果我们是在开发环境进行调试的时候，也就是使用local[K]部署模式，在本地启动K个Worker线程来计算，这K个Worker在同一个JVM实例里，上面的代码默认情况是，如果没有传参数则是local[K]模式，所以如果使用这种方式在创建Redis连接池或连接的时候，可能非常容易调试通过，但是在使用Spark Standalone、YARN Client（YARN Cluster）或Mesos集群部署模式的时候，就会报错，主要是由于在处理Redis连接池或连接的时候出错了。我们可以看一下Spark架构，如图所示（来自官网）：
        <br/>
        <img src="http://dataunion.org/wp-content/uploads/2015/05/spark-cluster-overview1.png"/>
        <br/>
        无论是在本地模式、Standalone模式，还是在Mesos或YARN模式下，整个Spark集群的结构都可以用上图抽象表示，只是各个组件的运行环境不同，导致组件可能是分布式的，或本地的，或单个JVM实例的。如在本地模式，则上图表现为在同一节点上的单个进程之内的多个组件；而在YARN Client模式下，Driver程序是在YARN集群之外的一个节点上提交Spark Application，其他的组件都运行在YARN集群管理的节点上。
       </p>
       <p>
        在Spark集群环境部署Application后，在进行计算的时候会将作用于RDD数据集上的函数（Functions）发送到集群中Worker上的Executor上（在Spark Streaming中是作用于DStream的操作），那么这些函数操作所作用的对象（Elements）必须是可序列化的，通过Scala也可以使用lazy引用来解决，否则这些对象（Elements）在跨节点序列化传输后，无法正确地执行反序列化重构成实际可用的对象。上面代码我们使用lazy引用（Lazy Reference）来实现的，代码如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55bd765587510" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          // lazy pool reference
lazy val pool = new JedisPool(new GenericObjectPoolConfig(), redisHost, redisPort, redisTimeout)
...
partitionOfRecords.foreach(pair =&amp;gt; {
  val uid = pair._1
  val clickCount = pair._2
  val jedis = RedisClient.pool.getResource
  jedis.select(dbIndex)
  jedis.hincrBy(clickHashKey, uid, clickCount)
  RedisClient.pool.returnResource(jedis)
})
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55bd765587510-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55bd765587510-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55bd765587510-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55bd765587510-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55bd765587510-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55bd765587510-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55bd765587510-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55bd765587510-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55bd765587510-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55bd765587510-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55bd765587510-11">
               11
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55bd765587510-1">
               <span class="crayon-c">
                // lazy pool reference
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55bd765587510-2">
               <span class="crayon-e">
                lazy
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                JedisPool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                GenericObjectPoolConfig
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55bd765587510-3">
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-sy">
                .
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55bd765587510-4">
               <span class="crayon-v">
                partitionOfRecords
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-st">
                foreach
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55bd765587510-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                uid
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                _1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55bd765587510-6">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                clickCount
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                _2
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55bd765587510-7">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                RedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getResource
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55bd765587510-8">
               <span class="crayon-e">
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                select
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                dbIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55bd765587510-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                hincrBy
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                clickHashKey
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                uid
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                clickCount
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55bd765587510-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                RedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                returnResource
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55bd765587510-11">
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0117 seconds] -->
       <p>
        另一种方式，我们将代码修改为，把对Redis连接的管理放在操作DStream的Output操作范围之内，因为我们知道它是在特定的Executor中进行初始化的，使用一个单例的对象来管理，如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55c4116158290" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          package org.shirdrn.spark.streaming

import org.apache.commons.pool2.impl.GenericObjectPoolConfig
import org.apache.spark.SparkConf
import org.apache.spark.streaming.Seconds
import org.apache.spark.streaming.StreamingContext
import org.apache.spark.streaming.dstream.DStream.toPairDStreamFunctions
import org.apache.spark.streaming.kafka.KafkaUtils

import kafka.serializer.StringDecoder
import net.sf.json.JSONObject
import redis.clients.jedis.JedisPool

object UserClickCountAnalytics {

  def main(args: Array[String]): Unit = {
    var masterUrl = "local[1]"
    if (args.length &amp;gt; 0) {
      masterUrl = args(0)
    }

    // Create a StreamingContext with the given master URL
    val conf = new SparkConf().setMaster(masterUrl).setAppName("UserClickCountStat")
    val ssc = new StreamingContext(conf, Seconds(5))

    // Kafka configurations
    val topics = Set("user_events")
    val brokers = "10.10.4.126:9092,10.10.4.127:9092"
    val kafkaParams = Map[String, String](
      "metadata.broker.list" -&amp;gt; brokers, "serializer.class" -&amp;gt; "kafka.serializer.StringEncoder")

    val dbIndex = 1
    val clickHashKey = "app::users::click"

    // Create a direct stream
    val kafkaStream = KafkaUtils.createDirectStream[String, String, StringDecoder, StringDecoder](ssc, kafkaParams, topics)

    val events = kafkaStream.flatMap(line =&amp;gt; {
      val data = JSONObject.fromObject(line._2)
      Some(data)
    })

    // Compute user click times
    val userClicks = events.map(x =&amp;gt; (x.getString("uid"), x.getInt("click_count"))).reduceByKey(_ + _)
    userClicks.foreachRDD(rdd =&amp;gt; {
      rdd.foreachPartition(partitionOfRecords =&amp;gt; {
        partitionOfRecords.foreach(pair =&amp;gt; {
         
          /**
           * Internal Redis client for managing Redis connection {@link Jedis} based on {@link RedisPool}
           */
          object InternalRedisClient extends Serializable {
           
            @transient private var pool: JedisPool = null
           
            def makePool(redisHost: String, redisPort: Int, redisTimeout: Int,
                maxTotal: Int, maxIdle: Int, minIdle: Int): Unit = {
              makePool(redisHost, redisPort, redisTimeout, maxTotal, maxIdle, minIdle, true, false, 10000)   
            }
           
            def makePool(redisHost: String, redisPort: Int, redisTimeout: Int,
                maxTotal: Int, maxIdle: Int, minIdle: Int, testOnBorrow: Boolean,
                testOnReturn: Boolean, maxWaitMillis: Long): Unit = {
              if(pool == null) {
                   val poolConfig = new GenericObjectPoolConfig()
                   poolConfig.setMaxTotal(maxTotal)
                   poolConfig.setMaxIdle(maxIdle)
                   poolConfig.setMinIdle(minIdle)
                   poolConfig.setTestOnBorrow(testOnBorrow)
                   poolConfig.setTestOnReturn(testOnReturn)
                   poolConfig.setMaxWaitMillis(maxWaitMillis)
                   pool = new JedisPool(poolConfig, redisHost, redisPort, redisTimeout)
                  
                   val hook = new Thread{
                        override def run = pool.destroy()
                   }
                   sys.addShutdownHook(hook.run)
              }
            }
           
            def getPool: JedisPool = {
              assert(pool != null)
              pool
            }
          }
         
          // Redis configurations
          val maxTotal = 10
          val maxIdle = 10
          val minIdle = 1
          val redisHost = "10.10.4.130"
          val redisPort = 6379
          val redisTimeout = 30000
          val dbIndex = 1
          InternalRedisClient.makePool(redisHost, redisPort, redisTimeout, maxTotal, maxIdle, minIdle)
         
          val uid = pair._1
          val clickCount = pair._2
          val jedis =InternalRedisClient.getPool.getResource
          jedis.select(dbIndex)
          jedis.hincrBy(clickHashKey, uid, clickCount)
          InternalRedisClient.getPool.returnResource(jedis)
        })
      })
    })

    ssc.start()
    ssc.awaitTermination()

  }
}
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-49">
               49
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-50">
               50
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-51">
               51
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-52">
               52
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-53">
               53
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-54">
               54
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-55">
               55
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-56">
               56
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-57">
               57
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-58">
               58
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-59">
               59
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-60">
               60
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-61">
               61
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-62">
               62
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-63">
               63
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-64">
               64
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-65">
               65
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-66">
               66
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-67">
               67
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-68">
               68
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-69">
               69
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-70">
               70
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-71">
               71
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-72">
               72
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-73">
               73
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-74">
               74
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-75">
               75
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-76">
               76
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-77">
               77
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-78">
               78
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-79">
               79
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-80">
               80
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-81">
               81
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-82">
               82
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-83">
               83
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-84">
               84
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-85">
               85
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-86">
               86
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-87">
               87
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-88">
               88
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-89">
               89
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-90">
               90
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-91">
               91
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-92">
               92
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-93">
               93
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-94">
               94
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-95">
               95
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-96">
               96
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-97">
               97
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-98">
               98
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-99">
               99
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-100">
               100
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-101">
               101
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-102">
               102
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-103">
               103
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-104">
               104
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-105">
               105
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-106">
               106
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-107">
               107
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-108">
               108
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-109">
               109
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55c4116158290-110">
               110
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55c4116158290-111">
               111
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-1">
               <span class="crayon-t">
                package
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                shirdrn
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                streaming
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-2">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-3">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                commons
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                pool2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                impl
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                GenericObjectPoolConfig
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-4">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                SparkConf
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-5">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                Seconds
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-6">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                StreamingContext
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-7">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                dstream
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                DStream
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                toPairDStreamFunctions
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-8">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                KafkaUtils
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-9">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-10">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                kafka
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                serializer
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                StringDecoder
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-11">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                sf
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                json
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                JSONObject
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-12">
               <span class="crayon-e">
                import
               </span>
               <span class="crayon-v">
                redis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                clients
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                JedisPool
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-13">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-14">
               <span class="crayon-t">
                object
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                UserClickCountAnalytics
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-15">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                main
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Array
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Unit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                var
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                masterUrl
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "local[1]"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                args
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                length
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                masterUrl
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                args
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                0
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-21">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Create a StreamingContext with the given master URL
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                SparkConf
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setMaster
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                masterUrl
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setAppName
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "UserClickCountStat"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                StreamingContext
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Seconds
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-25">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Kafka configurations
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                topics
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Set
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "user_events"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                brokers
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "10.10.4.126:9092,10.10.4.127:9092"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                kafkaParams
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Map
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                (
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "metadata.broker.list"
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                brokers
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "serializer.class"
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "kafka.serializer.StringEncoder"
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-31">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                dbIndex
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                clickHashKey
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "app::users::click"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-34">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Create a direct stream
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-36">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                kafkaStream
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                KafkaUtils
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                createDirectStream
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                StringDecoder
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                StringDecoder
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                kafkaParams
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                topics
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-37">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-38">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                events
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                kafkaStream
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                flatMap
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                data
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                JSONObject
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                fromObject
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                line
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                _2
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-40">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Some
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                data
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-42">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Compute user click times
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-44">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                userClicks
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                events
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                map
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getString
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "uid"
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                x
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getInt
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-s">
                "click_count"
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                reduceByKey
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                +
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                _
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                userClicks
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                foreachRDD
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                rdd
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                rdd
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                foreachPartition
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                partitionOfRecords
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-47">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                partitionOfRecords
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-st">
                foreach
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =&amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-48">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-49">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                /**
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-50">
               <span class="crayon-c">
                * Internal Redis client for managing Redis connection {@link Jedis} based on {@link RedisPool}
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-51">
               <span class="crayon-c">
                */
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-52">
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                object
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                InternalRedisClient
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                extends
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Serializable
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-53">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-54">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                @
               </span>
               <span class="crayon-e">
                transient
               </span>
               <span class="crayon-m">
                private
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                var
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                JedisPool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                null
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-55">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-56">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                makePool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-57">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxTotal
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxIdle
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minIdle
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Unit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-58">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                makePool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxTotal
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxIdle
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minIdle
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                true
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                false
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                10000
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-59">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-60">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-61">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-e">
                makePool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                String
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-62">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxTotal
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxIdle
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minIdle
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Int
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                testOnBorrow
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Boolean
               </span>
               <span class="crayon-sy">
                ,
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-63">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                testOnReturn
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Boolean
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxWaitMillis
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                Long
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                Unit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-64">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                if
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                ==
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                null
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-65">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                GenericObjectPoolConfig
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-66">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setMaxTotal
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                maxTotal
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-67">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setMaxIdle
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                maxIdle
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-68">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setMinIdle
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                minIdle
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-69">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setTestOnBorrow
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                testOnBorrow
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-70">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setTestOnReturn
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                testOnReturn
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-71">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                setMaxWaitMillis
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                maxWaitMillis
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-72">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                JedisPool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                poolConfig
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-73">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-74">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                hook
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-r">
                new
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                Thread
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-75">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                override
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-v">
                run
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                destroy
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-76">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-77">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                sys
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                addShutdownHook
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                hook
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                run
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-78">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-79">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-80">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-81">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                def
               </span>
               <span class="crayon-v">
                getPool
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                JedisPool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                {
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-82">
               <span class="crayon-h">
               </span>
               <span class="crayon-st">
                assert
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                pool
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                !=
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-t">
                null
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-83">
               <span class="crayon-h">
               </span>
               <span class="crayon-i">
                pool
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-84">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-85">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-86">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-87">
               <span class="crayon-h">
               </span>
               <span class="crayon-c">
                // Redis configurations
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-88">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                maxTotal
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                10
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-89">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                maxIdle
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                10
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-90">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                minIdle
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-91">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "10.10.4.130"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-92">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                6379
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-93">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                30000
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-94">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                dbIndex
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-cn">
                1
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-95">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                InternalRedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                makePool
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                redisHost
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisPort
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                redisTimeout
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxTotal
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                maxIdle
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                minIdle
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-96">
               <span class="crayon-h">
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-97">
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                uid
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                _1
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-98">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                clickCount
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                pair
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                _2
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-99">
               <span class="crayon-e">
               </span>
               <span class="crayon-e">
                val
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-v">
                InternalRedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                getPool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                getResource
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-100">
               <span class="crayon-e">
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                select
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                dbIndex
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-101">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                hincrBy
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                clickHashKey
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                uid
               </span>
               <span class="crayon-sy">
                ,
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                clickCount
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-102">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                InternalRedisClient
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                getPool
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                returnResource
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-103">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-104">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-105">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-106">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-107">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                start
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-108">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                ssc
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-e">
                awaitTermination
               </span>
               <span class="crayon-sy">
                (
               </span>
               <span class="crayon-sy">
                )
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-109">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55c4116158290-110">
               <span class="crayon-h">
               </span>
               <span class="crayon-sy">
                }
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55c4116158290-111">
               <span class="crayon-sy">
                }
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.1165 seconds] -->
       <p>
        上面代码实现，得益于Scala语言的特性，可以在代码中任何位置进行class或object的定义，我们将用来管理Redis连接的代码放在了特定操作的内部，就避免了瞬态（Transient）对象跨节点序列化的问题。这样做还要求我们能够了解Spark内部是如何操作RDD数据集的，更多可以参考RDD或Spark相关文档。
       </p>
       <p>
        在集群上，以Standalone模式运行，执行如下命令：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55ce457529804" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          cd /usr/local/spark
./bin/spark-submit --class org.shirdrn.spark.streaming.UserClickCountAnalytics --master spark://hadoop1:7077 --executor-memory 1G --total-executor-cores 2 ~/spark-0.0.SNAPSHOT.jar spark://hadoop1:7077
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55ce457529804-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55ce457529804-2">
               2
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55ce457529804-1">
               <span class="crayon-v">
                cd
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                usr
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                local
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-i">
                spark
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55ce457529804-2">
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                bin
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                submit
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-t">
                class
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                shirdrn
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                UserClickCountAnalytics
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                --
               </span>
               <span class="crayon-e">
                master
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-c">
                //hadoop1:7077 --executor-memory 1G --total-executor-cores 2 ~/spark-0.0.SNAPSHOT.jar spark://hadoop1:7077
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0118 seconds] -->
       <p>
       </p>
       <div class="syntaxhighlighter " id="highlighter_200136">
       </div>
       <p>
        可以查看集群中各个Worker节点执行计算任务的状态，也可以非常方便地通过Web页面查看。
       </p>
       <p>
        下面，看一下我们存储到Redis中的计算结果，如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55d5105504306" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          127.0.0.1:6379[1]&amp;gt; HGETALL app::users::click
1) "4A4D769EB9679C054DE81B973ED5D768"
2) "7037"
3) "8dfeb5aaafc027d89349ac9a20b3930f"
4) "6992"
5) "011BBF43B89BFBF266C865DF0397AA71"
6) "7021"
7) "97edfc08311c70143401745a03a50706"
8) "6874"
9) "d7f141563005d1b5d0d3dd30138f3f62"
10) "7057"
11) "a95f22eabc4fd4b580c011a3161a9d9d"
12) "7092"
13) "6b67c8c700427dee7552f81f3228c927"
14) "7266"
15) "f2a8474bf7bd94f0aabbd4cdd2c06dcf"
16) "7188"
17) "c8ee90aade1671a21336c721512b817a"
18) "6950"
19) "068b746ed4620d25e26055a9f804385f"
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55d5105504306-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55d5105504306-20">
               20
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-1">
               <span class="crayon-cn">
                127.0.0.1
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-cn">
                6379
               </span>
               <span class="crayon-sy">
                [
               </span>
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                ]
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-e">
                HGETALL
               </span>
               <span class="crayon-v">
                app
               </span>
               <span class="crayon-o">
                ::
               </span>
               <span class="crayon-v">
                users
               </span>
               <span class="crayon-o">
                ::
               </span>
               <span class="crayon-i">
                click
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-2">
               <span class="crayon-cn">
                1
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "4A4D769EB9679C054DE81B973ED5D768"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-3">
               <span class="crayon-cn">
                2
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "7037"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-4">
               <span class="crayon-cn">
                3
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "8dfeb5aaafc027d89349ac9a20b3930f"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-5">
               <span class="crayon-cn">
                4
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "6992"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-6">
               <span class="crayon-cn">
                5
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "011BBF43B89BFBF266C865DF0397AA71"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-7">
               <span class="crayon-cn">
                6
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "7021"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-8">
               <span class="crayon-cn">
                7
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "97edfc08311c70143401745a03a50706"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-9">
               <span class="crayon-cn">
                8
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "6874"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-10">
               <span class="crayon-cn">
                9
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "d7f141563005d1b5d0d3dd30138f3f62"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-11">
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "7057"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-12">
               <span class="crayon-cn">
                11
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "a95f22eabc4fd4b580c011a3161a9d9d"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-13">
               <span class="crayon-cn">
                12
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "7092"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-14">
               <span class="crayon-cn">
                13
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "6b67c8c700427dee7552f81f3228c927"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-15">
               <span class="crayon-cn">
                14
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "7266"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-16">
               <span class="crayon-cn">
                15
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "f2a8474bf7bd94f0aabbd4cdd2c06dcf"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-17">
               <span class="crayon-cn">
                16
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "7188"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-18">
               <span class="crayon-cn">
                17
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "c8ee90aade1671a21336c721512b817a"
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55d5105504306-19">
               <span class="crayon-cn">
                18
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "6950"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55d5105504306-20">
               <span class="crayon-cn">
                19
               </span>
               <span class="crayon-sy">
                )
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-s">
                "068b746ed4620d25e26055a9f804385f"
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.0099 seconds] -->
       <p>
        有关更多关于Spark Streaming的详细内容，可以参考官方文档。
       </p>
       <p>
        <strong>
         附录
        </strong>
       </p>
       <p>
        这里，附上前面开发的应用所对应的依赖，以及打包Spark Streaming应用程序的Maven配置，以供参考。如果使用maven-shade-plugin插件，配置有问题的话，打包后在Spark集群上提交Application时候可能会报错Invalid signature file digest for Manifest main attributes。参考的Maven配置，如下所示：
       </p>
       <!-- Crayon Syntax Highlighter v_2.7.2_beta -->
       <div class="crayon-syntax crayon-theme-classic crayon-font-monaco crayon-os-pc print-yes notranslate" data-settings=" minimize scroll-mouseover" id="crayon-5768660ce55db144182323" style=" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;">
        <div class="crayon-toolbar" data-settings=" mouseover overlay hide delay" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
         <span class="crayon-title">
         </span>
         <div class="crayon-tools" style="font-size: 12px !important;height: 18px !important; line-height: 18px !important;">
          <div class="crayon-button crayon-nums-button" title="切换是否显示行编号">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-plain-button" title="纯文本显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-wrap-button" title="切换自动换行">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-expand-button" title="点击展开代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-copy-button" title="复制代码">
           <div class="crayon-button-icon">
           </div>
          </div>
          <div class="crayon-button crayon-popup-button" title="在新窗口中显示代码">
           <div class="crayon-button-icon">
           </div>
          </div>
         </div>
        </div>
        <div class="crayon-info" style="min-height: 16.8px !important; line-height: 16.8px !important;">
        </div>
        <div class="crayon-plain-wrap">
         <textarea class="crayon-plain print-no" data-settings="dblclick" readonly="" style="-moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4; font-size: 12px !important; line-height: 15px !important;" wrap="soft">
          &amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&amp;gt;
     &amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;
     &amp;lt;groupId&amp;gt;org.shirdrn.spark&amp;lt;/groupId&amp;gt;
     &amp;lt;artifactId&amp;gt;spark&amp;lt;/artifactId&amp;gt;
     &amp;lt;version&amp;gt;0.0.1-SNAPSHOT&amp;lt;/version&amp;gt;

     &amp;lt;dependencies&amp;gt;
          &amp;lt;dependency&amp;gt;
               &amp;lt;groupId&amp;gt;org.apache.spark&amp;lt;/groupId&amp;gt;
               &amp;lt;artifactId&amp;gt;spark-core_2.10&amp;lt;/artifactId&amp;gt;
               &amp;lt;version&amp;gt;1.3.0&amp;lt;/version&amp;gt;
          &amp;lt;/dependency&amp;gt;
          &amp;lt;dependency&amp;gt;
               &amp;lt;groupId&amp;gt;org.apache.spark&amp;lt;/groupId&amp;gt;
               &amp;lt;artifactId&amp;gt;spark-streaming_2.10&amp;lt;/artifactId&amp;gt;
               &amp;lt;version&amp;gt;1.3.0&amp;lt;/version&amp;gt;
          &amp;lt;/dependency&amp;gt;
          &amp;lt;dependency&amp;gt;
               &amp;lt;groupId&amp;gt;net.sf.json-lib&amp;lt;/groupId&amp;gt;
               &amp;lt;artifactId&amp;gt;json-lib&amp;lt;/artifactId&amp;gt;
               &amp;lt;version&amp;gt;2.3&amp;lt;/version&amp;gt;
          &amp;lt;/dependency&amp;gt;
          &amp;lt;dependency&amp;gt;
               &amp;lt;groupId&amp;gt;org.apache.spark&amp;lt;/groupId&amp;gt;
               &amp;lt;artifactId&amp;gt;spark-streaming-kafka_2.10&amp;lt;/artifactId&amp;gt;
               &amp;lt;version&amp;gt;1.3.0&amp;lt;/version&amp;gt;
          &amp;lt;/dependency&amp;gt;
          &amp;lt;dependency&amp;gt;
               &amp;lt;groupId&amp;gt;redis.clients&amp;lt;/groupId&amp;gt;
               &amp;lt;artifactId&amp;gt;jedis&amp;lt;/artifactId&amp;gt;
               &amp;lt;version&amp;gt;2.5.2&amp;lt;/version&amp;gt;
          &amp;lt;/dependency&amp;gt;
          &amp;lt;dependency&amp;gt;
               &amp;lt;groupId&amp;gt;org.apache.commons&amp;lt;/groupId&amp;gt;
               &amp;lt;artifactId&amp;gt;commons-pool2&amp;lt;/artifactId&amp;gt;
               &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;
          &amp;lt;/dependency&amp;gt;
     &amp;lt;/dependencies&amp;gt;

     &amp;lt;build&amp;gt;
          &amp;lt;sourceDirectory&amp;gt;${basedir}/src/main/scala&amp;lt;/sourceDirectory&amp;gt;
          &amp;lt;testSourceDirectory&amp;gt;${basedir}/src/test/scala&amp;lt;/testSourceDirectory&amp;gt;
          &amp;lt;resources&amp;gt;
               &amp;lt;resource&amp;gt;
                    &amp;lt;directory&amp;gt;${basedir}/src/main/resources&amp;lt;/directory&amp;gt;
               &amp;lt;/resource&amp;gt;
          &amp;lt;/resources&amp;gt;
          &amp;lt;testResources&amp;gt;
               &amp;lt;testResource&amp;gt;
                    &amp;lt;directory&amp;gt;${basedir}/src/test/resources&amp;lt;/directory&amp;gt;
               &amp;lt;/testResource&amp;gt;
          &amp;lt;/testResources&amp;gt;
          &amp;lt;plugins&amp;gt;
               &amp;lt;plugin&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;3.1&amp;lt;/version&amp;gt;
                    &amp;lt;configuration&amp;gt;
                         &amp;lt;source&amp;gt;1.6&amp;lt;/source&amp;gt;
                         &amp;lt;target&amp;gt;1.6&amp;lt;/target&amp;gt;
                    &amp;lt;/configuration&amp;gt;
               &amp;lt;/plugin&amp;gt;
               &amp;lt;plugin&amp;gt;
                    &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;
                    &amp;lt;artifactId&amp;gt;maven-shade-plugin&amp;lt;/artifactId&amp;gt;
                    &amp;lt;version&amp;gt;2.2&amp;lt;/version&amp;gt;
                    &amp;lt;configuration&amp;gt;
                         &amp;lt;createDependencyReducedPom&amp;gt;true&amp;lt;/createDependencyReducedPom&amp;gt;
                    &amp;lt;/configuration&amp;gt;
                    &amp;lt;executions&amp;gt;
                         &amp;lt;execution&amp;gt;
                              &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;
                              &amp;lt;goals&amp;gt;
                                   &amp;lt;goal&amp;gt;shade&amp;lt;/goal&amp;gt;
                              &amp;lt;/goals&amp;gt;
                              &amp;lt;configuration&amp;gt;
                                   &amp;lt;artifactSet&amp;gt;
                                        &amp;lt;includes&amp;gt;
                                             &amp;lt;include&amp;gt;*:*&amp;lt;/include&amp;gt;
                                        &amp;lt;/includes&amp;gt;
                                   &amp;lt;/artifactSet&amp;gt;
                                   &amp;lt;filters&amp;gt;
                                        &amp;lt;filter&amp;gt;
                                             &amp;lt;artifact&amp;gt;*:*&amp;lt;/artifact&amp;gt;
                                             &amp;lt;excludes&amp;gt;
                                                  &amp;lt;exclude&amp;gt;META-INF/*.SF&amp;lt;/exclude&amp;gt;
                                                  &amp;lt;exclude&amp;gt;META-INF/*.DSA&amp;lt;/exclude&amp;gt;
                                                  &amp;lt;exclude&amp;gt;META-INF/*.RSA&amp;lt;/exclude&amp;gt;
                                             &amp;lt;/excludes&amp;gt;
                                        &amp;lt;/filter&amp;gt;
                                   &amp;lt;/filters&amp;gt;
                                   &amp;lt;transformers&amp;gt;
                                        &amp;lt;transformer
                                             implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" /&amp;gt;
                                        &amp;lt;transformer
                                             implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"&amp;gt;
                                             &amp;lt;resource&amp;gt;reference.conf&amp;lt;/resource&amp;gt;
                                        &amp;lt;/transformer&amp;gt;
                                        &amp;lt;transformer
                                             implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"&amp;gt;
                                             &amp;lt;resource&amp;gt;log4j.properties&amp;lt;/resource&amp;gt;
                                        &amp;lt;/transformer&amp;gt;
                                   &amp;lt;/transformers&amp;gt;
                              &amp;lt;/configuration&amp;gt;
                         &amp;lt;/execution&amp;gt;
                    &amp;lt;/executions&amp;gt;
               &amp;lt;/plugin&amp;gt;
          &amp;lt;/plugins&amp;gt;
     &amp;lt;/build&amp;gt;
&amp;lt;/project&amp;gt;
         </textarea>
        </div>
        <div class="crayon-main" style="">
         <table class="crayon-table">
          <tbody>
           <tr class="crayon-row">
            <td class="crayon-nums " data-settings="show">
             <div class="crayon-nums-content" style="font-size: 12px !important; line-height: 15px !important;">
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-1">
               1
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-2">
               2
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-3">
               3
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-4">
               4
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-5">
               5
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-6">
               6
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-7">
               7
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-8">
               8
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-9">
               9
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-10">
               10
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-11">
               11
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-12">
               12
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-13">
               13
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-14">
               14
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-15">
               15
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-16">
               16
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-17">
               17
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-18">
               18
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-19">
               19
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-20">
               20
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-21">
               21
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-22">
               22
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-23">
               23
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-24">
               24
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-25">
               25
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-26">
               26
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-27">
               27
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-28">
               28
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-29">
               29
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-30">
               30
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-31">
               31
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-32">
               32
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-33">
               33
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-34">
               34
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-35">
               35
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-36">
               36
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-37">
               37
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-38">
               38
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-39">
               39
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-40">
               40
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-41">
               41
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-42">
               42
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-43">
               43
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-44">
               44
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-45">
               45
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-46">
               46
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-47">
               47
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-48">
               48
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-49">
               49
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-50">
               50
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-51">
               51
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-52">
               52
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-53">
               53
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-54">
               54
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-55">
               55
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-56">
               56
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-57">
               57
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-58">
               58
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-59">
               59
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-60">
               60
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-61">
               61
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-62">
               62
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-63">
               63
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-64">
               64
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-65">
               65
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-66">
               66
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-67">
               67
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-68">
               68
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-69">
               69
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-70">
               70
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-71">
               71
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-72">
               72
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-73">
               73
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-74">
               74
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-75">
               75
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-76">
               76
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-77">
               77
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-78">
               78
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-79">
               79
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-80">
               80
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-81">
               81
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-82">
               82
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-83">
               83
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-84">
               84
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-85">
               85
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-86">
               86
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-87">
               87
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-88">
               88
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-89">
               89
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-90">
               90
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-91">
               91
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-92">
               92
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-93">
               93
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-94">
               94
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-95">
               95
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-96">
               96
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-97">
               97
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-98">
               98
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-99">
               99
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-100">
               100
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-101">
               101
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-102">
               102
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-103">
               103
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-104">
               104
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-105">
               105
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-106">
               106
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-107">
               107
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-108">
               108
              </div>
              <div class="crayon-num" data-line="crayon-5768660ce55db144182323-109">
               109
              </div>
              <div class="crayon-num crayon-striped-num" data-line="crayon-5768660ce55db144182323-110">
               110
              </div>
             </div>
            </td>
            <td class="crayon-code">
             <div class="crayon-pre" style="font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;">
              <div class="crayon-line" id="crayon-5768660ce55db144182323-1">
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-e">
                project
               </span>
               <span class="crayon-v">
                xmlns
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "http://maven.apache.org/POM/4.0.0"
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                xmlns
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-v">
                xsi
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "http://www.w3.org/2001/XMLSchema-instance"
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-2">
               <span class="crayon-h">
               </span>
               <span class="crayon-v">
                xsi
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-v">
                schemaLocation
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-3">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                modelVersion
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                4.0.0
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                modelVersion
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-4">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                shirdrn
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-5">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-6">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                0.0.1
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                SNAPSHOT
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-7">
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-8">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependencies
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-9">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-10">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-11">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                core_2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-12">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1.3.0
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-13">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-14">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-15">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-16">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                streaming_2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-17">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1.3.0
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-18">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-19">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-20">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                net
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                sf
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                json
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-21">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                json
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                lib
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-22">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                2.3
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-23">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-24">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-25">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-26">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                spark
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                streaming
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                kafka_2
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-cn">
                10
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-27">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1.3.0
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-28">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-29">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-30">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                redis
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                clients
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-31">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                jedis
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-32">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                2.5.2
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-33">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-34">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-35">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                commons
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-36">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                commons
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                pool2
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-37">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                2.2
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-38">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependency
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-39">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                dependencies
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-40">
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-41">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                build
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-42">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                sourceDirectory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                basedir
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                src
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                main
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                sourceDirectory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-43">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                testSourceDirectory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                basedir
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                src
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                scala
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                testSourceDirectory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-44">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                resources
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-45">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                resource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-46">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                directory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                basedir
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                src
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                main
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                resources
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                directory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-47">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                resource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-48">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                resources
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-49">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                testResources
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-50">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                testResource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-51">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                directory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-sy">
                $
               </span>
               <span class="crayon-sy">
                {
               </span>
               <span class="crayon-v">
                basedir
               </span>
               <span class="crayon-sy">
                }
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                src
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                test
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                resources
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                directory
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-52">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                testResource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-53">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                testResources
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-54">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                plugins
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-55">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                plugin
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-56">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                maven
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                compiler
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                plugin
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-57">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                3.1
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-58">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                configuration
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-59">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                source
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1.6
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                source
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-60">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                target
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                1.6
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                target
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-61">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                configuration
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-62">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                plugin
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-63">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                plugin
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-64">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                org
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                apache
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                maven
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                plugins
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                groupId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-65">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                maven
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                shade
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                plugin
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactId
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-66">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-cn">
                2.2
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                version
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-67">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                configuration
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-68">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                createDependencyReducedPom
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-t">
                true
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                createDependencyReducedPom
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-69">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                configuration
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-70">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                executions
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-71">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                execution
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-72">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                phase
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-t">
                package
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                phase
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-73">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                goals
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-74">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                goal
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                shade
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                goal
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-75">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                goals
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-76">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                configuration
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-77">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifactSet
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-78">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                includes
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-79">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                include
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                include
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-80">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                includes
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-81">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifactSet
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-82">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                filters
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-83">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                filter
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-84">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                artifact
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-o">
                :
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                artifact
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-85">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                excludes
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-86">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                exclude
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                META
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                INF
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                SF
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                exclude
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-87">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                exclude
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                META
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                INF
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                DSA
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                exclude
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-88">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                exclude
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                META
               </span>
               <span class="crayon-o">
                -
               </span>
               <span class="crayon-v">
                INF
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                *
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                RSA
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                exclude
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-89">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                excludes
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-90">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                filter
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-91">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                filters
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-92">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                transformers
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-93">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-e">
                transformer
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-94">
               <span class="crayon-e">
               </span>
               <span class="crayon-v">
                implementation
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"
               </span>
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-95">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-e">
                transformer
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-96">
               <span class="crayon-e">
               </span>
               <span class="crayon-v">
                implementation
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "org.apache.maven.plugins.shade.resource.AppendingTransformer"
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-97">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                resource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                reference
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                conf
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                resource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-98">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                transformer
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-99">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-e">
                transformer
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-100">
               <span class="crayon-e">
               </span>
               <span class="crayon-v">
                implementation
               </span>
               <span class="crayon-o">
                =
               </span>
               <span class="crayon-s">
                "org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer"
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-101">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                resource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-v">
                log4j
               </span>
               <span class="crayon-sy">
                .
               </span>
               <span class="crayon-v">
                properties
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                resource
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-102">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                transformer
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-103">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                transformers
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-104">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                configuration
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-105">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                execution
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-106">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                executions
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-107">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                plugin
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-108">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                plugins
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line" id="crayon-5768660ce55db144182323-109">
               <span class="crayon-h">
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                build
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
              <div class="crayon-line crayon-striped-line" id="crayon-5768660ce55db144182323-110">
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                lt
               </span>
               <span class="crayon-sy">
                ;
               </span>
               <span class="crayon-o">
                /
               </span>
               <span class="crayon-v">
                project
               </span>
               <span class="crayon-o">
                &amp;
               </span>
               <span class="crayon-v">
                gt
               </span>
               <span class="crayon-sy">
                ;
               </span>
              </div>
             </div>
            </td>
           </tr>
          </tbody>
         </table>
        </div>
       </div>
       <!-- [Format Time: 0.1001 seconds] -->
       <p>
        <strong>
         参考链接
        </strong>
       </p>
       <ul>
        <li>
         <a href="http://spark.apache.org/docs/latest/index.html" target="_blank">
          http://spark.apache.org/docs/latest/index.html
         </a>
        </li>
        <li>
         <a href="http://spark.apache.org/docs/latest/cluster-overview.html" target="_blank">
          http://spark.apache.org/docs/latest/cluster-overview.html
         </a>
        </li>
        <li>
         <a href="http://spark.apache.org/docs/latest/job-scheduling.html" target="_blank">
          http://spark.apache.org/docs/latest/job-scheduling.html
         </a>
        </li>
        <li>
         <a href="http://spark.apache.org/docs/latest/streaming-programming-guide.html" target="_blank">
          http://spark.apache.org/docs/latest/streaming-programming-guide.html
         </a>
        </li>
        <li>
         <a href="http://stackoverflow.com/questions/28006517/redis-on-sparktask-not-serializable" target="_blank">
          http://stackoverflow.com/questions/28006517/redis-on-sparktask-not-serializable
         </a>
        </li>
       </ul>
      </div>
      <div>
       <strong>
        注：转载文章均来自于公开网络，仅供学习使用，不会用于任何商业用途，如果侵犯到原作者的权益，请您与我们联系删除或者授权事宜，联系邮箱：contact@dataunion.org。转载数盟网站文章请注明原文章作者，否则产生的任何版权纠纷与数盟无关。
       </strong>
      </div>
      <!--content_text-->
      <div class="fenxian">
       <!-- JiaThis Button BEGIN -->
       <div class="jiathis_style_32x32">
        <p class="jiathis_button_weixin">
        </p>
        <p class="jiathis_button_tsina">
        </p>
        <p class="jiathis_button_qzone">
        </p>
        <p class="jiathis_button_cqq">
        </p>
        <p class="jiathis_button_tumblr">
        </p>
        <a class="jiathis jiathis_txt jtico jtico_jiathis" href="http://www.jiathis.com/share" target="_blank">
        </a>
        <p class="jiathis_counter_style">
        </p>
       </div>
       <!-- JiaThis Button END -->
      </div>
     </article>
     <!--content-->
     <!--相关文章-->
     <div class="xianguan">
      <div class="xianguantitle">
       相关文章！
      </div>
      <ul class="pic">
       <li>
        <a href="http://dataunion.org/24220.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/05/100910rrxp5plglxk4lcle-291x200.png"/>
        </a>
        <a class="link" href="http://dataunion.org/24220.html" rel="bookmark" title="520大数据：八成男性期待被表白 “套路”也是爱">
         520大数据：八成男性期待被表白 “套路”也是爱
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/23785.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/04/u7145986293872240263fm21gp0-298x200.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/23785.html" rel="bookmark" title="Docker安全基准：22项新增要点概述">
         Docker安全基准：22项新增要点概述
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/23703.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/04/1317020-300x163.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/23703.html" rel="bookmark" title="推荐：五个不容错过的数据科学家博客">
         推荐：五个不容错过的数据科学家博客
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/23507.html">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/110606wjpugdldig4idddn.jpg"/>
        </a>
        <a class="link" href="http://dataunion.org/23507.html" rel="bookmark" title="解密深度学习在智能推荐系统的实践与应用">
         解密深度学习在智能推荐系统的实践与应用
        </a>
       </li>
      </ul>
     </div>
     <!--相关文章-->
     <div class="comment" id="comments">
      <!-- You can start editing here. -->
      <!-- If comments are open, but there are no comments. -->
      <div class="title">
       期待你一针见血的评论，Come on！
      </div>
      <div id="respond">
       <p>
        不用想啦，马上
        <a href="http://dataunion.org/wp-login.php?redirect_to=http%3A%2F%2Fdataunion.org%2F17837.html">
         "登录"
        </a>
        发表自已的想法.
       </p>
      </div>
     </div>
     <!-- .nav-single -->
    </div>
    <!--Container End-->
    <aside id="sitebar">
     <div class="sitebar_list2">
      <div class="wptag">
       <span class="tagtitle">
        热门标签+
       </span>
       <div class="tagg">
        <ul class="menu" id="menu-%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5">
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-1605" id="menu-item-1605">
          <a href="http://taidizh.com/">
           泰迪智慧
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20884" id="menu-item-20884">
          <a href="http://www.transwarp.cn/">
           星环科技
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3538" id="menu-item-3538">
          <a href="http://datall.org/">
           珈和遥感
          </a>
         </li>
         <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-20888" id="menu-item-20888">
          <a href="http://www.chinahadoop.cn/">
           小象学院
          </a>
         </li>
        </ul>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <div class="textwidget">
       <div align="center">
        <a href="http://study.163.com/course/courseMain.htm?courseId=991022" target="_blank">
         <img src="http://dataunion.org/wp-content/uploads/2016/03/dv.jpg"/>
        </a>
       </div>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       文章分类
      </h4>
      <div class="tagcloud">
       <a class="tag-link-44" href="http://dataunion.org/category/industry/demo" style="font-size: 10.204724409449pt;" title="4个话题">
        Demo展示
       </a>
       <a class="tag-link-31" href="http://dataunion.org/category/experts" style="font-size: 15.826771653543pt;" title="52个话题">
        专家团队
       </a>
       <a class="tag-link-870" href="http://dataunion.org/category/tech/ai" style="font-size: 19.795275590551pt;" title="273个话题">
        人工智能
       </a>
       <a class="tag-link-488" href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f" style="font-size: 8pt;" title="1个话题">
        加入数盟
       </a>
       <a class="tag-link-869" href="http://dataunion.org/category/tech/viz" style="font-size: 17.204724409449pt;" title="93个话题">
        可视化
       </a>
       <a class="tag-link-30" href="http://dataunion.org/category/partners" style="font-size: 10.645669291339pt;" title="5个话题">
        合作伙伴
       </a>
       <a class="tag-link-889" href="http://dataunion.org/category/parterc" style="font-size: 11.582677165354pt;" title="8个话题">
        合作会议
       </a>
       <a class="tag-link-104" href="http://dataunion.org/category/books" style="font-size: 12.96062992126pt;" title="15个话题">
        图书
       </a>
       <a class="tag-link-220" href="http://dataunion.org/category/tech/base" style="font-size: 19.850393700787pt;" title="281个话题">
        基础架构
       </a>
       <a class="tag-link-219" href="http://dataunion.org/category/tech/analysis" style="font-size: 19.409448818898pt;" title="232个话题">
        数据分析
       </a>
       <a class="tag-link-887" href="http://dataunion.org/category/tech/dm" style="font-size: 13.291338582677pt;" title="17个话题">
        数据挖掘
       </a>
       <a class="tag-link-34" href="http://dataunion.org/category/tech" style="font-size: 20.732283464567pt;" title="404个话题">
        文章
       </a>
       <a class="tag-link-1" href="http://dataunion.org/category/uncategorized" style="font-size: 22pt;" title="693个话题">
        未分类
       </a>
       <a class="tag-link-4" href="http://dataunion.org/category/events" style="font-size: 14.503937007874pt;" title="29个话题">
        活动
       </a>
       <a class="tag-link-890" href="http://dataunion.org/category/tech/%e6%b7%b1%e5%ba%a6%e5%ad%a6%e4%b9%a0" style="font-size: 10.204724409449pt;" title="4个话题">
        深度学习
       </a>
       <a class="tag-link-221" href="http://dataunion.org/category/tech/devl" style="font-size: 18.968503937008pt;" title="193个话题">
        编程语言
       </a>
       <a class="tag-link-888" href="http://dataunion.org/category/career" style="font-size: 15.661417322835pt;" title="48个话题">
        职业规划
       </a>
       <a class="tag-link-5" href="http://dataunion.org/category/jobs" style="font-size: 14.11811023622pt;" title="25个话题">
        职位
       </a>
       <a class="tag-link-871" href="http://dataunion.org/category/industry" style="font-size: 15.716535433071pt;" title="49个话题">
        行业
       </a>
       <a class="tag-link-613" href="http://dataunion.org/category/industry/case" style="font-size: 16.984251968504pt;" title="84个话题">
        行业应用
       </a>
       <a class="tag-link-885" href="http://dataunion.org/category/industry/news" style="font-size: 17.425196850394pt;" title="102个话题">
        行业资讯
       </a>
       <a class="tag-link-10" href="http://dataunion.org/category/training" style="font-size: 14.228346456693pt;" title="26个话题">
        课程
       </a>
       <a class="tag-link-16" href="http://dataunion.org/category/sources" style="font-size: 15.661417322835pt;" title="48个话题">
        资源
       </a>
      </div>
     </div>
     <div class="sitebar_list">
      <h4 class="sitebar_title">
       功能
      </h4>
      <ul>
       <li>
        <a href="http://dataunion.org/wp-login.php?action=register">
         注册
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/wp-login.php">
         登录
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/feed">
         文章
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="http://dataunion.org/comments/feed">
         评论
         <abbr title="Really Simple Syndication">
          RSS
         </abbr>
        </a>
       </li>
       <li>
        <a href="https://cn.wordpress.org/" title="基于WordPress，一个优美、先进的个人信息发布平台。">
         WordPress.org
        </a>
       </li>
      </ul>
     </div>
    </aside>
    <div class="clear">
    </div>
   </div>
   <!--main-->
   ﻿
   <footer id="dibu">
    <div class="about">
     <div class="right">
      <ul class="menu" id="menu-%e5%ba%95%e9%83%a8%e8%8f%9c%e5%8d%95">
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-18024" id="menu-item-18024">
        <a href="http://dataunion.org/category/partners">
         合作伙伴
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20881" id="menu-item-20881">
        <a href="http://dataunion.org/contribute">
         文章投稿
        </a>
       </li>
       <li class="menu-item menu-item-type-taxonomy menu-item-object-category menu-item-20872" id="menu-item-20872">
        <a href="http://dataunion.org/category/%e5%8a%a0%e5%85%a5%e6%95%b0%e7%9b%9f">
         加入数盟
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-22441" id="menu-item-22441">
        <a href="http://dataunion.org/f-links">
         友情链接
        </a>
       </li>
       <li class="menu-item menu-item-type-post_type menu-item-object-page menu-item-20874" id="menu-item-20874">
        <a href="http://dataunion.org/aboutus">
         关于数盟
        </a>
       </li>
      </ul>
      <p class="banquan">
       数盟社区        ，
        做最棒的数据科学社区
      </p>
     </div>
     <div class="left">
      <ul class="bottomlist">
       <li>
        <a href="http://weibo.com/DataScientistUnion  " target="_blank" 　title="">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weibo.png"/>
        </a>
       </li>
       <li>
        <a class="cd-popup-trigger" href="http://dataunion.org/17837.html#0">
         <img src="http://dataunion.org/wp-content/themes/yzipi/images/weixin.png"/>
        </a>
       </li>
      </ul>
      <div class="cd-popup">
       <div class="cd-popup-container">
        <h1>
         扫描二维码,加微信公众号
        </h1>
        <img src="http://dataunion.org/wp-content/themes/yzipi/images/2014-12-06-1515289049.png"/>
        <a class="cd-popup-close" href="http://dataunion.org/17837.html">
        </a>
       </div>
       <!-- cd-popup-container -->
      </div>
      <!-- cd-popup -->
     </div>
    </div>
    <!--about-->
    <div class="bottom">
     <a href="http://dataunion.org/">
      数盟社区
     </a>
     <a href="http://www.miitbeian.gov.cn/" rel="external nofollow" target="_blank">
      京ICP备14026740号
     </a>
     联系我们：
     <a href="mailto:contact@dataunion.org" target="_blank">
      contact@dataunion.org
     </a>
     <div class="tongji">
     </div>
     <!--bottom-->
     <div class="scroll" id="scroll" style="display:none;">
      ︿
     </div>
    </div>
   </footer>
   <!--dibu-->
  </div>
 </body>
</html>